package springCache;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class Dog {
    @Autowired
    private Cat lover;
    public Dog() {
        System.out.println("Dog 被创建");
    }
    public String getName() {
        return "旺财";
    }
    public String getLoverName() {
        return lover.getName();
    }

}
